feat/user-facing profile view and edit pages - #52
Merged
Conversation
…an be reused in the profile page
…vatar, name, and pronouns
… can access current user
…er; wordmark in topbar is clickable and allows users to return to their dashboard
nexus_test previously only existed because it was created manually with a one-off createdb command, so dropping the postgres_data volume silently broke the test suite. Mount db-init/ to docker-entrypoint-initdb.d so Postgres creates it automatically on first container init, and update the README accordingly.
…t changes in schema where EventResponse is nested in experience responses and EventCategoryResponse is nested in event responses
…into its own section component
…ail page - authApi.me() and the User type were removed; user was only checked for truthiness anyway - pulls user from the root-level AuthProvider (UserMeSlim) instead
… from dropdown doesnt get recognized
…on an experience row in edit mode for spreadsheets in view-edit mode
… link to account settings
16 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Users need a place to view their full profile and update it after the initial sign-up flow. The edit page reuses components from sign-up step 2 but as a flat form with current values pre-filled.
Changes
Backend
pronounsanddate_of_birthalready exist onUserfrom the prior structured-experience PRpronounsremoved from the required-fields list incompute_missing_profile_fields()(app/core/profile_status.py) — no longer blocks profile completenessUserMeSlimResponse/UserMeFullResponse(GET /users/me/andGET /users/me/?full=true); admin read isGET /admin/users/{user_id}/viaUserFullResponse— none of these changed in this PRGET /events/(pre-existing route) is now actually consumed by the frontend for the competition-experience event pickerFrontend —
/profile/[id](profile view)/dashboardifcurrentUser.id !== profileId(string-coerced comparison on both sides)GET /users/me/?full=trueon mount/profile/[id]/editProfileHeaderlinks to/account-settings, which doesn't exist yet — placeholder for a later PRis_locked-equivalent field that doesn't exist onUserVolunteerExperienceyet)Frontend —
/profile/[id]/edit(edit profile)GET /users/me/?full=trueon mountis_studenttoggle with student (university/major/status) or non-student (employer) branch, shirt size, dietary restriction, date of birthhas_*_experience=falseviaPATCH /users/me/; unset fields are simply omitted from the PATCH body (dropped by the request serializer) rather than explicitly set tonull, so underexclude_unsetthey're left unchanged, not resetGET /events/, fields are event, school, notesPATCH /users/me/(exclude_unset— only changed fields sent)Input,Select,Textarea,RadioOptioncomponents, plus new profile-specific field components (see below)Also included — supporting frontend changes
dashboard/layout.tsxdeleted;AuthProvidermoved up to the root layout, so non-dashboard routes like/profile/[id]can use auth contextAvatarCircle,ProfileFields, and section componentsEducationCareerSection/LogisticsSectionUserAvatarrewritten to useAvatarCircleand adds a "Profile" menu item linking to/profile/[id]Also included — unrelated fixes swept into this range
tailwind.config.tsremovednexus_testdatabase now auto-creates on a fresh Postgres volume (local dev infra)useAuth()instead of the removedauthApi.me()Testing
/profile/[id]date_of_birthnever appears in any response other than self-view (UserMeFullResponseonly — not on the admin-facingUserFullResponse)Notes
date_of_birthis self-view only, never exposed to other users; a TD-facing view exposing only age-threshold booleans is deferred to a later issueGETroutes for experience sub-tables — always read throughGET /users/me/?full=true